const {execSql} = require("../utils/db")
class ad{
    static async get(type){
        //查询广告位置表 看下当前查询的类型 并且 该广告位下的广告需要是展示的状态
        let list = await execSql(`select * from lv_ad as A ,lv_position as P where A.pid=P.id and P.type='${type}' and A.flag=1`)
        console.log(`select * from lv_ad as A ,lv_position as P where A.pid=P.id and P.type='${type}' and A.flag=1`,6)
        return list
    }
}
module.exports=ad